package com.hyf.dagger2.di.module;

import com.hyf.dagger2.app.Dagger2Application;
import com.hyf.dagger2.constant.UserInfo;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by HyFun on 2018/11/20.
 * Email: 775183940@qq.com
 * Description:
 */
@Module
public class AppModule {
    private Dagger2Application application;

    public AppModule(Dagger2Application application) {
        this.application = application;
    }

    @Provides
    @Singleton
    Dagger2Application provideApplicationContext() {
        return application;
    }

    @Provides
    @Singleton
    UserInfo provideUserInfo(){
        return new UserInfo("user info");
    }
}
